<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Kowcore
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: TagCloud.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Kowcore
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Kowcore_View_Helper_TagCloud extends Zend_View_Helper_Abstract {
	
	protected $_name;
	
	public function tagCloud(array $tags, $onclick = '', $title = 'Tag Cloud') {
		if (empty ( $tags )) {
			return '';
		}
		
		$active = Zend_Controller_Front::getInstance ()->getRequest ()->getParam ( 'tag', Zend_Controller_Front::getInstance ()->getRequest ()->getParam ( 'tag_id', '' ) );
		
		return $this->view->partial ( 'helper/tag-cloud.tpl', 'kowcore', array ('tags' => $tags, 'onclick' => $onclick, 'title' => $title, 'active' => $active ) );
	}

}